﻿using System.Data.Entity.ModelConfiguration;

namespace CIK.News.Domain.Mappings
{
    public abstract class EntityMappingBase<T> : EntityTypeConfiguration<T> where T : Entity
    {
        protected EntityMappingBase()
        {
            HasKey(x => x.Id);

            Property(x => x.CreatedDate).IsRequired();
            Property(x => x.CreatedBy).IsRequired();
            Property(x => x.ModifiedDate).IsOptional();
        }
    }
}